<html>
<head><meta charset="utf-8"><title>x.py always updates LLVM submodule · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html">x.py always updates LLVM submodule</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="240113320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240113320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240113320">(May 24 2021 at 21:17)</a>:</h4>
<p>Since pulling from the latest master, <code>x.py build --stage 1 library/std</code> is always printing 'Updating submodule src/llvm-project'</p>



<a name="240113389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240113389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240113389">(May 24 2021 at 21:18)</a>:</h4>
<p>previously, it would only print this when the submoule was checked ut to a different commit (which it isn't)</p>



<a name="240113455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240113455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240113455">(May 24 2021 at 21:18)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="232545">@Joshua Nelson</span></p>



<a name="240113860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240113860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240113860">(May 24 2021 at 21:22)</a>:</h4>
<p>this sounds like a regression from <a href="https://github.com/rust-lang/rust/pull/81601">https://github.com/rust-lang/rust/pull/81601</a></p>



<a name="240113936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240113936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240113936">(May 24 2021 at 21:23)</a>:</h4>
<p>I don't have time to look into it right now - I would have to figure out why the logic is different from the python version. I know it's checking more often (whenever someone calls <code>builder.ensure(LLVM)</code>) but it should bail out before it gets to actually updating the submodule</p>



<a name="240114002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240114002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240114002">(May 24 2021 at 21:24)</a>:</h4>
<p>hmm this is probably the same issue causing <a href="https://github.com/rust-lang/rust/pull/82653">https://github.com/rust-lang/rust/pull/82653</a> to update stdarch 3 times actually</p>



<a name="240114080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240114080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240114080">(May 24 2021 at 21:25)</a>:</h4>
<p><span class="user-mention" data-user-id="125294">@Aaron Hill</span> a short term workaround is to run <code>git submodule deinit src/llvm-project</code>, which avoids updating LLVM at all ever (if you have download-ci-llvm set)</p>



<a name="240114112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240114112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240114112">(May 24 2021 at 21:25)</a>:</h4>
<p>I'll try that</p>



<a name="240114131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240114131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240114131">(May 24 2021 at 21:25)</a>:</h4>
<p>it's not a huge issue (updating the submodule seems to be very fast for me)</p>



<a name="240114136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240114136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240114136">(May 24 2021 at 21:25)</a>:</h4>
<p>just wanted to make sure you were aware of it</p>



<a name="240114140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240114140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240114140">(May 24 2021 at 21:25)</a>:</h4>
<p>yeah it's pretty fast on linux</p>



<a name="240114149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240114149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240114149">(May 24 2021 at 21:25)</a>:</h4>
<p>(it's very slow for me on windows, so thanks for the workaround :)</p>



<a name="240114154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240114154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240114154">(May 24 2021 at 21:25)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125294">Aaron Hill</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/x.2Epy.20always.20updates.20LLVM.20submodule/near/240114136">said</a>:</p>
<blockquote>
<p>just wanted to make sure you were aware of it</p>
</blockquote>
<p>I was not before, thanks for the bug report :)</p>



<a name="240115410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240115410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240115410">(May 24 2021 at 21:36)</a>:</h4>
<p>Note that in general <code>git submodule deinit</code> will speed up things a lot for llvm, even before this PR. What my change did is avoid cloning llvm in the first place when someone first downloads rust-lang/rust.</p>



<a name="240116150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240116150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240116150">(May 24 2021 at 21:43)</a>:</h4>
<p>hm</p>



<a name="240116193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240116193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240116193">(May 24 2021 at 21:43)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> do you expect to look into it over the next few days? if not I'll post a revert to that PR, I'd rather not leave developers on slow builds for too long</p>



<a name="240116212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240116212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240116212">(May 24 2021 at 21:44)</a>:</h4>
<p>(granted deinit maybe is not a bad thing to get people to do)</p>



<a name="240117131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240117131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240117131">(May 24 2021 at 21:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> no idea when I'll have time, happy for you to revert in the meantime</p>



<a name="240117188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240117188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240117188">(May 24 2021 at 21:52)</a>:</h4>
<p>(but please ping me on the PR so I have a reminder somewhere)</p>



<a name="240117251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240117251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240117251">(May 24 2021 at 21:53)</a>:</h4>
<p>Sounds good. Maybe you can even review it? :)</p>



<a name="240117304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240117304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240117304">(May 24 2021 at 21:53)</a>:</h4>
<p>not sure if I'll have time even for that, but if you ping me I'll try to take a look</p>



<a name="240117310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/x.py%20always%20updates%20LLVM%20submodule/near/240117310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/x.2Epy.20always.20updates.20LLVM.20submodule.html#240117310">(May 24 2021 at 21:53)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/85647">https://github.com/rust-lang/rust/pull/85647</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>